#include <iostream>
void endiandetect(void){
    int t=1;
    char h=*(char*)&t;

    if(h==1){
        std::cout<<"le"<<std::endl;
    }else{
        std::cout<<"be"<<std::endl;
    }
}

void endiandetect2(void){
    union {
        int theint;
        char thechar;
    } t;
    t.theint=1;

    if(t.thechar==1){
        std::cout<<"le"<<std::endl;
    }else{
        std::cout<<"be"<<std::endl;
    }
}


int main()
{
    endiandetect();
    endiandetect2();
	return 0;
}
